package controller

import (
	"cloudpichost/internal/controller/pidbed_controller"
	"cloudpichost/internal/middleware"
	"cloudpichost/internal/router"
)

func init() {
	r := router.New("pic_bed", "/")
	r.GET("/", pidbed_controller.WebUpload)
	r.GET("/list", pidbed_controller.IndexList)
	r.GET("/up_page", pidbed_controller.SingleFile)
	r.POST("uploads", middleware.CheckConfigUpload, pidbed_controller.UploadHandler)
	r.POST("islogin", pidbed_controller.IsLogin)
	r.POST("login", pidbed_controller.LoginHandler)
	r.POST("register", middleware.CheckSiteReg, pidbed_controller.RegisterHandler)
	r.GET("logout", pidbed_controller.Logout)
	r.POST("logout", pidbed_controller.Logout)
}
